package com.itstudy.study.response;

import lombok.Data;

import java.io.Serializable;

/**
 * 统一返回类
 * @author chenxiaofan
 */
@Data
public class R implements Serializable {


    private String code;

    private Object data;

    private String msg;

    public R(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public R(Object data) {
        this.code = "200";
        this.data = data;
        this.msg = "请求成功";
    }
}
